Release 10.1A: OpenEdge Development:
Debugging and Troubleshooting


Watches pane

The watches pane keeps track of variables, buffer fields, attributes, data, and built-in 4GL functions on which a watch is set. For more information on functions as watches, see the "Watches for built-in functions" section.

The watches pane has a context (right-click) menu containing the following options: Copy, Cut, Paste, Add Watch (adds a new variable to the watches pane), Remove Watch, and Dataview (displays attribute or field information for the selected variable in the Dataview dialog box).

You can add a watch by:

Note the following with respect to validity checking of the selected text:

Valid watch formats are any of the following:

[ VARIABLE | FIELD | PARAMETER ] name  
handle:attribute  
widget-name:attribute [IN FRAME frame-name ] 
{ FRAME | MENU } widget-name:attribute  
{ SUB-MENU | MENU-ITEM } widget-name:attribute 
   [ IN { MENU | SUB-MENU } menu-name ] 

You can chain attribute references. For example, the following attribute reference displays the value of the TITLE attribute for a window containing a fill-in (assuming the fill-in is three levels from the window):

FILL-IN-1:PARENT:PARENT:PARENT:TITLE 

If a variable is currently out of scope, or you add a watch for an unknown variable name, the following message appears in the value cell:

** Unavailable ** 

Double-clicking on a cell containing the value of a variable makes the value editable. You can modify the value by entering a different value and pressing the ENTER key or clicking out of the cell. Pressing the ESC key when editing a value restores the current value and cancels the editing operation.

You can remove a watch for a variable by selecting the watch in the watches pane and then:

Watches for built-in functions

You can add a watch to a built-in 4GL function to track the status of the function.

To add a new watch, type the complete function name directly in the watches pane or choose Debug Add Watch. The Debugger displays the function and its value in the Watches pane.

Table 3–2 lists the 4GL functions supported by the Debugger.

Table 3–2: 4GL functions supported by the Debugger 
Functions that can accept assignment of a new value
Functions that cannot accept assignment of a new value
CURRENT-LANGUAGE 
PROMSGS 
PROPATH 
_PCONTROL           NUM-ALIASES 
_SERIAL-NUM         NUM-DBS 
COM SELF            OPSYS 
DATASERVERS         OS-DRIVES 
DBNAME              OS-ERROR 
ETIME               PROGRESS 
FRAME-DB            PROVERSION 
FRAME-FIELD         RETRY 
FRAME-INDEX         RETURN-VALUE 
FRAME-NAME          SCREEN-LINES 
FRAME-VALUE         TERMINAL 
GO-PENDING          TIME 
LASTKEY             TODAY 
MACHINE-CLASS       TRANSACTION 
MESSAGE-LINES        

Note: TERMINAL is settable only on UNIX character interfaces.

The values of TIME and TODAY change independently of program execution, so the values displayed in the watches pane might not agree with the last values displayed in the 4GL program.

You can modify a function’s value by editing the value cell in the Watches pane. If the function does not accept an assignment, the function retains its value. In this case, the Debugger does not generate an error message.

Note: You cannot watch a function that requires arguments.

Drag-and-drop watches

You can add a watch by dragging an entity to the watches pane.

To add a watch by dragging and dropping:

  1. Select the text that you want to add a watch for in the source code pane (by clicking and dragging with the mouse to select the text).
  2. Drag the selected text to the watches pane.
  3. Release the mouse button to add the object as a watch to the last (empty) row in the watches pane. If you release the mouse over any other pane or outside the Debugger window, the watch is not added.

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095